' Two Windows API calls used to read and write private .INI files.
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpSectionName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpSectionName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lplFileName As String) As Integer
' The data structure that stores high scores.
Type tScores
Name As String
Score As Long
End Type
' This should ALWAYS be set to MAX_HISCORES + 1.
Global Hi(1 To 6) As tScores
' The current number of high scores stored in Hi() array.
Global Num_HiScores As Integer
' The new score to test.
Global gNewScore As Long
' The .INI file to store scoring information.
Global gINIFile As String
' This global boolean tells the form to just display
' the high scores (no player name data entry).
Global gDisplayOnly As Integer
' The game title displayed as the form caption
' of the High Score window.
Global gGameTitle As String
Sub AddScoreAndSave (ByVal NewName As String, ByVal NewScore As Long)